
// ---------------------------------------------------
// | File Name   : relay.h
// | Author   	 : chagn7z
// | Create Date : 2014-6-16
// ---------------------------------------------------

#ifndef _RELAY_H_
#define _RELAY_H_

/* relay IO pin define */
#define RELAY_A1 PCout(8)
#define RELAY_A2 PCout(9)
#define RELAY_B1 PAout(8)
#define RELAY_B2 PAout(9)
#define RELAY_C  PAout(10)
#define RELAY_D  PAout(11)
#define RELAY_E  PAout(12)

/* relay control bit */
#define RELAYA_BIT  0x01
#define RELAYB1_BIT 0x02
#define RELAYB2_BIT 0x04
#define RELAYC_BIT  0x08
#define RELAYD_BIT  0x10
#define RELAYE_BIT  0x20

/* export function */
void relay_init(void);
void relay_dt(void);

/* inner function */
void relay_dt_a(void);
void relay_dt_b(void);
void relay_dt_c(void);
void relay_dt_d(void);
void relay_dt_e(void);
void relay_dt_status(void);

#endif
